package entityclasses;

import java.io.*;
import java.util.*;

public class Related {

	private Person aPerson;
	private String relatedness;

        public void addRelated(Person addTo)
        {
            addTo.getProfile().getRelateds().add(this);
        }
        public void removeRelated(Person removeFrom)
        {
            removeFrom.getProfile().getRelateds().remove(this);
        }

    /**
     * @param aPerson the aPerson to set
     */
    public void setaPerson(Person aPerson) {
        this.aPerson = aPerson;
    }

    /**
     * @param relatedness the relatedness to set
     */
    public void setRelatedness(String relatedness) {
        this.relatedness = relatedness;
    }
    
    @Override
    public String toString()
    {
        return aPerson.toString() + " - " + relatedness;
    }
}
